# coding=utf-8
from django.shortcuts import render

from .models import Picture, Sign

# Create your views here
def show_pictures(request, wx_id):
    p = Picture.objects.filter(wx_id=wx_id).order_by("-insert_time")
    return render(request, 'api/pictures.html', {
        'picture_list': p,
        })


def sign_history(request, wx_id):
    p = Sign.objects.filter(wx_id=wx_id).order_by("-sign_time")
    return render(request, 'api/sign_history.html', {
        'sign_list': p,
        })